package com.explorer.ider.bootguide.views;

import android.content.Context;
import android.util.AttributeSet;
import android.util.Log;
import android.view.View;
import android.widget.TextView;

import com.explorer.ider.bootguide.R;

import static com.google.android.gms.wearable.DataMap.TAG;

/**
 * Created by Eric on 2016/9/29.
 */

public class TextColorView extends TextView implements View.OnFocusChangeListener{
    public TextColorView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }


    @Override
    public void onFocusChange(View v, boolean hasFocus) {
        Log.i(TAG, "onFocusChange: " + "11111111111111111111111111");
        if (hasFocus){
            this.setTextColor(getResources().getColor(R.color.colorWrite));
        }else{
            this.setTextColor(getResources().getColor(R.color.colorText));
        }
    }
}
